#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
import socket
import time
from threading import Thread

def task():
    client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    client.connect(("127.0.0.1", 2299))

    while True:
        msg = "hello world"
        client.send(msg.encode("utf-8"))
        data = client.recv(1024).decode("utf-8")
        print(data)

task()